package com.jddai.controller;

import com.jddai.pojo.Result;
import com.jddai.service.BRBService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.io.IOException;

@CrossOrigin
@Controller
@RequestMapping("BRB_back2")
public class BRBController {

    @Autowired
    BRBService brbService;

    @GetMapping("/updateData")
    @ResponseBody
    @CrossOrigin
    public Result updateDate(@RequestParam("choose") String choose,
                             @RequestParam("param") int param) throws IOException {
        return brbService.optimal(choose, param);
    }

}
